<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>表单查询</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="346635164">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "346635164";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("query.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建表单查询"
  			,"inport":"导入表单查询"
  			,"update":"修改表单查询"
  			,"detail":"表单查询详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#queryForm").form({
		"":function(){}
		,"srvQuery.sqId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvQuery.sqName":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "查询名称不能为空";
			}
			if(el.value.length>10 && el.value.indexOf("[*]")==-1)
				return "查询名称最大长度为10个字符";
		}
		,"srvQuery.sqIcon":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvQuery.sqPath":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "项目路径不能为空";
			}
			if(el.value.length>128 && el.value.indexOf("[*]")==-1)
				return "项目路径最大长度为128个字符";
		}
		,"srvQuery.sqParams":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "查询参数不能为空";
			}
			if(el.value.length>65535 && el.value.indexOf("[*]")==-1)
				return "查询参数最大长度为65535个字符";
		}
		,"srvQuery.sqEditor":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvQuery.sqUpdateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"srvQuery.sqAddTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"srvQuery.sqStatus":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="SrvQuery" id="queryForm" name="queryForm" target="jsoniframe" action="query.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写表单查询相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("sqId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqId"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqId"))))}}
	{{lz.set("sqId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqId}}
	<dl lz:if="{{sqId_editable||sqId_readonly}}" class="sqId hidden " major  ref="sqId">
		<dt>编　　号:</dt>
		<dd lz:if="{{sqId_editable}}" input="hidden">
			<lz:block lz:if="{{srvQuery$sqId}}">
				{{srvQuery$sqId}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqId}}">
			<input type="hidden" value="{{lz.htm(srvQuery.sqId)}}" name="srvQuery.sqId" id="sqId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqId">{{srvQuery.sqId}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqId$||srvQuery.sqId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqId}}
	{{lz.set("sqName_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqName"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqName"))))}}
	{{lz.set("sqName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqName}}
	<dl lz:if="{{sqName_editable||sqName_readonly}}" class="sqName  " major  ref="sqName">
		<dt>查询名称:</dt>
		<dd lz:if="{{sqName_editable}}" input="text">
			<lz:block lz:if="{{srvQuery$sqName}}">
				{{srvQuery$sqName}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqName}}">
		 	<input type="text" class="input narrow"   name="srvQuery.sqName" id="sqName"  value="{{lz.htm(srvQuery.sqName)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入表单查询的查询名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqName_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqName">{{srvQuery.sqName}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqName$||srvQuery.sqName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqName}}
	{{lz.set("sqIcon_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqIcon"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqIcon"))))}}
	{{lz.set("sqIcon_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqIcon}}
	<dl lz:if="{{sqIcon_editable||sqIcon_readonly}}" class="sqIcon   wider" major  ref="sqIcon">
		<dt>图　　标:</dt>
		<dd lz:if="{{sqIcon_editable}}" input="icon">
			<lz:block lz:if="{{srvQuery$sqIcon}}">
				{{srvQuery$sqIcon}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqIcon}}">
		 	<img class="sqIcon" src="" style="width:48px; height:48px; float:left; margin-right:10px;"/>
			<input type="hidden" name="srvQuery.sqIcon" id="sqIcon"  value="{{lz.htm(srvQuery.sqIcon)}}"/>
			<button class="button" type="button" onclick="top.$.getIcon({callback:function(path){$('#sqIcon').val(path);$('.sqIcon').attr('src',path)}});">系统图标</button>
			&nbsp;&nbsp;
			<button class="button" type="button" onclick="$.upload({type:'img',callback:function(path){$('#sqIcon').val(path);$('.sqIcon').attr('src',path)})">上传图标</button>
			&nbsp;&nbsp;
			<button class="button" type="button" onclick="$('#sqIcon').val('');$('.sqIcon').attr('src','')">删除图标</button>
			<br />
			上传图标时建议图标为透明png图片，48*48像素
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqIcon_readonly}}">
		 	<div class="state-input wide">
		 		<textarea class=""  style="display:none;" id="sqIcon">{{srvQuery.sqIcon}}</textarea>
		 		<span>
		 	<img lz:if="{{srvQuery.sqIcon}}" onclick="$.thumb({url:this.src})" style="margin:10px;padding:1px;border:1px solid;" onload="if(this.width>this.height){this.width=96}else{this.height=96}" src="{{lz.htm(srvQuery.sqIcon)}}"/>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqIcon}}
	{{lz.set("sqPath_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqPath"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqPath"))))}}
	{{lz.set("sqPath_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqPath}}
	<dl lz:if="{{sqPath_editable||sqPath_readonly}}" class="sqPath   mider" major  ref="sqPath">
		<dt>项目路径:</dt>
		<dd lz:if="{{sqPath_editable}}" input="text">
			<lz:block lz:if="{{srvQuery$sqPath}}">
				{{srvQuery$sqPath}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqPath}}">
		 	<input type="text" class="input mide"  maxlength="128" name="srvQuery.sqPath" id="sqPath"  value="{{lz.htm(srvQuery.sqPath)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入表单查询的项目路径</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqPath_readonly}}">
		 	<div class="state-input mide">
		 		<textarea class=""  style="display:none;" id="sqPath">{{srvQuery.sqPath}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqPath$||srvQuery.sqPath)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqPath}}
	{{lz.set("sqParams_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqParams"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqParams"))))}}
	{{lz.set("sqParams_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqParams}}
	<dl lz:if="{{sqParams_editable||sqParams_readonly}}" class="sqParams   wider" major  ref="sqParams">
		<dt>查询参数:</dt>
		<dd lz:if="{{sqParams_editable}}" input="textarea">
			<lz:block lz:if="{{srvQuery$sqParams}}">
				{{srvQuery$sqParams}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqParams}}">
		 	<textarea class="input wide"  id="sqParams" name="srvQuery.sqParams" rows="5">{{srvQuery.sqParams}}</textarea>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入表单查询的查询参数</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqParams_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(srvQuery.sqParams$||srvQuery.sqParams)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqParams}}
	{{lz.set("sqEditor_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqEditor"))))&&false)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqEditor"))))}}
	{{lz.set("sqEditor_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqEditor}}
	<dl lz:if="{{sqEditor_editable||sqEditor_readonly}}" class="sqEditor  " major  ref="sqEditor">
		<dt>添 加 人:</dt>
		<dd lz:if="{{sqEditor_editable}}" input="combox">
			<lz:block lz:if="{{srvQuery$sqEditor}}">
				{{srvQuery$sqEditor}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqEditor}}">
		 			<select class="combox narrow" action="/admin/permissions/user.query.do?size=255" id="sqEditor" name="srvQuery.sqEditor">
		 				<option selected="selected" value="{{lz.htm(srvQuery.sqEditor)}}">{{lz.htm(srvQuery.sqEditor$||srvQuery.sqEditor)}}</option>
		 			</select>
		 			<a class="lookup" href="javascript:void(0);" onclick="if($.trim($('#sqEditor').val())==''){return;};window.href('/admin/permissions/user.detail.do?key='+$('#sqEditor').val(),{ctrl:{editable:false}})"></a>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqEditor_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqEditor">{{srvQuery.sqEditor}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/permissions/user.details.html?key=srvQuery.sqEditor}')">
			 {{lz.html(srvQuery.sqEditor$||srvQuery.sqEditor)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqEditor}}
	{{lz.set("sqUpdateTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqUpdateTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"sqUpdateTime"))))}}
	{{lz.set("sqUpdateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqUpdateTime}}
	<dl lz:if="{{sqUpdateTime_editable||sqUpdateTime_readonly}}" class="sqUpdateTime  " major  ref="sqUpdateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{sqUpdateTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvQuery$sqUpdateTime}}">
				{{srvQuery$sqUpdateTime}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqUpdateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvQuery.sqUpdateTime" id="sqUpdateTime"  value="{{srvQuery.sqUpdateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择表单查询的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqUpdateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqUpdateTime">{{srvQuery.sqUpdateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqUpdateTime$||srvQuery.sqUpdateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqUpdateTime}}
	{{lz.set("sqAddTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqAddTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"sqAddTime"))))}}
	{{lz.set("sqAddTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqAddTime}}
	<dl lz:if="{{sqAddTime_editable||sqAddTime_readonly}}" class="sqAddTime  " major  ref="sqAddTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{sqAddTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvQuery$sqAddTime}}">
				{{srvQuery$sqAddTime}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqAddTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvQuery.sqAddTime" id="sqAddTime"  value="{{srvQuery.sqAddTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择表单查询的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqAddTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqAddTime">{{srvQuery.sqAddTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqAddTime$||srvQuery.sqAddTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqAddTime}}
	{{lz.set("sqStatus_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"sqStatus"))))&&false)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"sqStatus"))))}}
	{{lz.set("sqStatus_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$sqStatus}}
	<dl lz:if="{{sqStatus_editable||sqStatus_readonly}}" class="sqStatus  " major  ref="sqStatus">
		<dt>状　　态:</dt>
		<dd lz:if="{{sqStatus_editable}}" input="select">
			<lz:block lz:if="{{srvQuery$sqStatus}}">
				{{srvQuery$sqStatus}}
			</lz:block>
			<lz:block lz:if="{{!srvQuery$sqStatus}}">
		 	<select class="narrow" id="sqStatus" name="srvQuery.sqStatus">
		 		<option value="">请选择</option>
				<option value="1" selected='{{srvQuery.sqStatus=="1"?"selected":""}}'>正常</option>
				<option value="0" selected='{{srvQuery.sqStatus=="0"?"selected":""}}'>无效</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择表单查询的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{sqStatus_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="sqStatus">{{srvQuery.sqStatus}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvQuery.sqStatus$||srvQuery.sqStatus)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$sqStatus}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{srvQuery.sqId}}" name="srvQuery.sqId" id="sqId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/configurator/query.edit.html?edittype=update&id={{srvQuery.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteQuery('{{srvQuery.id}}','{{srvQuery.sqName}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/configurator/query.edit.html",document.title,"/admin//images/icons/Zoom.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/configurator/query.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除表单查询
	**/
	function deleteQuery(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除表单查询",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/configurator/query.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>